import React, { Component } from 'react'
import styles from "./storeMain.module.scss"
import {withRouter} from "react-router-dom"
/*
    这是商铺页面主体组件，大组件
    导入到了pages/FoodStore/index.js中
    覃金波 2020年8月22日17:48:02
*/
class StoreMain extends Component {
    
    changeStore = (storeId)=>{
        this.props.history.push("/foodStore/"+storeId)     
    }
    
    render() {
        return (
            <div>
                <div className={styles.storeMain}>
                    <div className={styles.mainNav}>
                        <div onClick={()=>{this.changeStore("1")}} className={styles.navItem}>点餐</div>
                        <div onClick={()=>{this.changeStore("comment/"+1)}} className={styles.navItem}>评价</div>
                        <div onClick={()=>{this.changeStore("merchant/"+1)}} className={styles.navItem}>商家</div>
                    </div>
                </div>
            </div>
        )
    }
}
export default withRouter(StoreMain)